<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" import="com.telecom.tree.*,java.util.*"%>
<jsp:directive.page import="com.telecom.cms.util.Constant"/>
<%@ taglib uri="/WEB-INF/tree.tld" prefix="tree"%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>收藏</title>
		<STYLE type=text/css></STYLE>
		<script type="text/javascript" src="dtree.js"></script>
		<script type="text/javascript" src="default.js"></script>
		<link rel="stylesheet" type="text/css" href="images/main.css">
		<SCRIPT>
<!--
	var checkedbox=null;
	function trim(str){  //删除左右两端的空格
 		return str.replace(/(^\s*)|(\s*$)/g, "");
	}
	function bconfirm(){
		if(opener)
	    {
	    	var foldername = document.getElementById("inboxname").value;
			var box= document.getElementsByName("parFolder");
			var a=trim(foldername);
			if(a==""){
	  			alert("请输入文件名!");
	  			return null;
	  		}
			for(var i=0;i<box.length;i++){
				if(box[i].checked){
					var parfolderid=box[i].value;
				}
			}
			if(parfolderid==null){
				alert("请选择保存路径!");
				return null;
			}
				opener.document.all.parfolderid.value=parfolderid;
				opener.document.all.foldername.value=foldername;
				var c=document.all.isfolder.checked;
				if(c==true)
				{	
					opener.document.all.isFold.value="isFolder"
				}else{
					opener.document.all.isFold.value="no"
				}
				opener.document.form1.action="collection.do" ;
				opener.document.form1.target="rsFrame";
				opener.document.form1.submit();
				opener.window.parent.frames['leftFrame'].location.reload();
		        window.opener=null;
		        window.close();
	   		}
	}
    function bcancel(){
        window.close();
    }
    function change(checkbox){
    	if(checkedbox!=null){
    		checkedbox.checked=false;
		}
		checkbox.checked=true;
		checkedbox=checkbox;
	}
      -->
    </SCRIPT>
	</head>
	<body>
		<table border="1" align="center" cellpadding="0" cellspacing="0" width="340" height="390">
			<tr>
				<td bgcolor="#f7f7f7">
					<FONT face="Arial, Helvetica, sans-serif"><b>
							请输入新主题收藏的名称: </B> </FONT>&nbsp;&nbsp;&nbsp;添加文件夹
							<input id="isfolder" type="checkbox">
				</td>
			</tr>
			<tr>
				<td>
					<INPUT id=inboxname type=text name=inboxname size=50>
					<%
								List userFolderTree = TreeUtil
								.retrieveNodeInfos(Constant.SEG_USER_FOLDER_DEF);
					%>
				</td>
			</tr>
			<tr>
				<td bgcolor="#f7f7f7">
					<FONT face="Arial, Helvetica, sans-serif"><b>
							请选择新主题收藏的路径:</b> </font>
				</td>
			</tr>
			<tr height="300">
				<td align="left" style="PADDING-TOP: 3px" valign="top"
					bgcolor="#f0f0ff">
					<script>
						<%=TreeUtil.createBoxTreeInfo(userFolderTree, "parFolder")%>
					</script>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="center" bgcolor="#f7f7f7">
					<INPUT type=button name=inputboxbt value=保存 onClick="bconfirm();">
					<INPUT type=button name=inputboxbs value=取消 onClick="bcancel();">
				</td>
			</tr>
		</table>


		<p align="center">
	</body>
</html>
